
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Term Report</title>
        <style type="text/css">
            body { font-family: arial; font-size: 11pt;}
            h1 {margin: 0;}
            td { vertical-align: top}
            p {margin: 0; margin-top:12px; margin-bottom:7px;}
            p.ident {margin: 0; padding-left:2px; padding-top:2px}
            .bakso {width: 760px; margin-bottom:20px;}
            .bakso td {}
            .box1 td {border: solid thin #888; margin-bottom: 0; padding: 5px 0;}
            .box3 td {border: solid thin #888; margin-bottom: 0; padding-bottom: 0; padding-top:5px;}
            .box1 p, .box3 p {padding-left: 7px; margin: 0; padding-bottom: 2px;}
            .box2 td, .box4 td  {border: solid thin #888; padding: 4px 7px 3px 7px;}
            .box2 p {margin: 0; padding: 0; margin-bottom: 5px;}
            .es td {border: none;border-top: solid thin #888;  padding: 0px 7px; padding-top: 3px;}
            .es2 td {border: none;border-top: solid thin #888;  padding: 5px 7px;  }
            .es2 p {padding-left: 0;  }
            .es p {padding-left: 0; margin: 0; padding-top: 2px; padding-bottom: 0px;}
            .es { margin-top:2px;}
            .es2 { margin-top:5px;}
            table { border-collapse:collapse;}
            .bandung1 {width: 80px}
            .bandung2 {width: 180px}
            .bandung3 {width: 65px}
            .bandung4 {width: 85px}
            #logocic { width:90px; height:auto; float:right}
            #logoterm { width:auto; height:50px; float:right; margin-right: 10px;}
            .essai {font-family: essai; padding-top:15; font-size:28pt; }
            .metro {width: 33%}
        </style>
    </head>

    <body>
        <p class="ih atasp">ComLabs USDI ITB | Term Report | Term-<?php echo $this->session->userdata('term') . ' ' . $this->session->userdata('tahun') ?></p>

        <!---->
        <table class="bakso" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td>
                    <h1 class="essai">Term Report</h1>
                    <p class="ident">Term-<?php echo $this->session->userdata('term') . ' ' . $this->session->userdata('tahun') ?> | <?php echo $term['BULAN_MULAI']?> - <?php echo $term['BULAN_SELESAI']?> <?php echo $term['TAHUN']?></p>
                </td>
                <td width="130">
                    <img id="logoterm" src="<?php echo $term['LOGO_TERM']?>"/>
                </td>
                <td width="100">
                    <img id="logocic" src="<?php echo base_url()?>images/logocic.png" />
                </td>
            </tr>
        </table>
        <!---->

        <table class="bakso" border="0" cellpadding="0" cellspacing="0" >
            <tr>
                <td><!--box1-->
                    <p>Summary</p>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="box1">
                        <tr>
                            <td>
                                <p>Total Pendaftar</p>
                                <p><strong><?php echo $total ?> Orang</strong></p>
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="es">
                                    <tr>
                                        <td>
                                            <p>ITB</p>
                                            <p><?php echo $itb=($dist_peserta[1] + $dist_peserta[2] + $dist_peserta[5] + $dist_peserta[6]) ?> Orang</p>
                                            <p><?php echo number_format(100*($itb/$total),1)?>%</p>
                                        </td>
                                        <td>
                                            <p>Non ITB</p>
                                            <p><?php echo $non_itb=($dist_peserta[3] + $dist_peserta[4]) ?> orang</p>
                                            <p><?php echo number_format(100*($non_itb/$total),1)?>%</p>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <p>Total Pemasukan</p>
                                <p><strong>Rp <?php echo number_format($total_pemasukan, 0, ',', '.') ?></strong></p>
                                <!---->
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="es">
                                    <tr>
                                        <td>
                                            <p>Masuk</p>
                                            <p>Rp <?php echo number_format($total_uang_masuk, 0, ',', '.') ?></p>
                                            <p><?php echo number_format(100*($total_uang_masuk/$total_pemasukan),1)?>%</p>
                                        </td>
                                        <td>
                                            <p>Piutang</p>
                                            <p>Rp <?php echo number_format($total_pemasukan-$total_uang_masuk, 0, ',', '.') ?></p>
                                            <p><?php echo number_format(100*(($total_pemasukan-$total_uang_masuk)/$total_pemasukan),1)?>%</p>
                                        </td>
                                    </tr>
                                </table>
                                <!---->
                            </td>
                            <td>
                                <p>Jumlah Kelas</p>
                                <p><strong><?php echo $total_kelas ?> Kelas</strong></p>
                                <!---->
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="es">
                                    <tr>
                                        <td>
                                            <p>Jalan</p>
                                            <p><?php echo $kelas_jalan?> Kelas</p>
                                            <p><?php echo number_format(100*($kelas_jalan/$total_kelas),1)?>%</p>
                                        </td>
                                        <td>
                                            <p>Belum</p>
                                            <p><?php echo $kelas_belum?> Kelas</p>
                                            <p><?php echo number_format(100*($kelas_belum/$total_kelas),1)?>%</p>
                                        </td>
                                        <td>
                                            <p>Selesai</p>
                                            <p><?php echo $kelas_selesai?> Kelas</p>
                                            <p><?php echo number_format(100*($kelas_selesai/$total_kelas),1)?>%</p>
                                        </td>
                                    </tr>
                                </table>
                                <!---->
                            </td>
                        </tr>
                    </table>
                </td><!--box1-->
            </tr>
            <tr>
                <td><!--box2-->
                    <p>Distribusi Peserta</p>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="box2">
                        <tr>
                            <td>Masiswa S1 ITB</td>
                            <td>Mahasiswa S2/S3, Alumni ITB</td>
                            <td>Pelajar, Mahasiswa Non ITB</td>
                            <td>Masyarakat Umum</td>
                            <td>Staff, Pegawai ITB</td>
                            <td>Internal ComLabs dan USDI</td>
                        </tr>
                        <tr>
                            <td>
                                <p><?php echo $dist_peserta[1] ?> Orang</p>
                                <p><?php echo number_format(100*($dist_peserta[1]/$total),1)?>%</p>
                            </td>
                            <td>
                                <p><?php echo $dist_peserta[2]?> Orang</p>
                                <p><?php echo number_format(100*($dist_peserta[2]/$total),1)?>%</p>
                            </td>
                            <td>
                                <p><?php echo $dist_peserta[3] ?> Orang</p>
                                <p><?php echo number_format(100*($dist_peserta[3]/$total),1)?>%</p>
                            </td>
                            <td>
                                <p><?php echo $dist_peserta[4] ?> Orang</p>
                                <p><?php echo number_format(100*($dist_peserta[4]/$total),1)?>%</p>
                            </td>
                            <td>
                                <p><?php echo $dist_peserta[5] ?> Orang</p>
                                <p><?php echo number_format(100*($dist_peserta[5]/$total),1)?>%</p>
                            </td>
                            <td>
                                <p><?php echo $dist_peserta[6] ?> Orang</p>
                                <p><?php echo number_format(100*($dist_peserta[6]/$total),1)?>%</p>
                            </td>
                        </tr>
                    </table>
                </td><!--box2-->
            </tr>
            <tr>
                <td><!--box3-->
                    <p>Statistik</p>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="box3">
                        <tr>
                            <td>
                                <p>Nilai Rata-rata</p>
                                <!----->
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="es2">
                                    <tr>
                                        <td>Jumlah Peserta Perkelas</td>
                                        <td><?php echo number_format($total / $total_kelas, 2) ?> Orang</td>
                                    </tr>
                                    <tr>
                                        <td>Pemasukan Perkelas</td>
                                        <td>Rp <?php echo number_format($total_pemasukan / $total_kelas, 0, ',', '.') ?></td>
                                    </tr>
                                    <tr>
                                        <td>Pemasukan Perpeserta</td>
                                        <td>Rp <?php echo number_format($total_pemasukan / $total, 0, ',', '.') ?></td>
                                    </tr>
                                </table>
                                <!----->
                            </td>
                            <td>
                                <p>Nilai Tertinggi dan Terendah</p>
                                <!----->
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="es2">
                                    <tr>
                                        <td class="metro">&nbsp;</td>
                                        <td class="metro">Tertinggi</td>
                                        <td class="metro">Terendah</td>
                                    </tr>
                                    <tr>
                                        <td class="metro">Pemasukan Total </td>
                                        <td>
                                            <p>
                                                <?php echo $pelatihan_max['KODE_PELATIHAN'].'-'.$pelatihan_max['ANGKATAN']?>
                                            </p>
                                            <p>
                                                Rp <?php echo number_format($pelatihan_max['harus_masuk'], 0, ',', '.') ?>
                                            </p>
                                        </td>
                                        <td>
                                            <p>
                                                <?php echo $pelatihan_min['KODE_PELATIHAN'].'-'.$pelatihan_min['ANGKATAN']?>
                                            </p>
                                            <p>
                                                Rp <?php echo number_format($pelatihan_min['harus_masuk'], 0, ',', '.') ?>
                                            </p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="metro">Jumlah Peserta</td>
                                        <td>
                                            <p>
                                                <?php echo $peserta_max['KODE_PELATIHAN'].'-'.$peserta_max['ANGKATAN']?>
                                            </p>
                                            <p>
                                                <?php echo $peserta_max['jumlah_peserta'] ?> Orang
                                            </p>
                                        </td>
                                        <td>
                                            <p>
                                                <?php echo $peserta_min['KODE_PELATIHAN'].'-'.$peserta_min['ANGKATAN']?>
                                            </p>
                                            <p>
                                                <?php echo $peserta_min['jumlah_peserta'] ?> Orang
                                            </p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="metro">Pemasukan Rata-rata Perpeserta</td>
                                        <td>
                                            <p>
                                                <?php echo $rata2_max['KODE_PELATIHAN'].'-'.$rata2_max['ANGKATAN']?>
                                            </p>
                                            <p>
                                                Rp <?php echo number_format($rata2_max['rata_per_orang'], 0, ',', '.') ?>
                                            </p>
                                        </td>
                                        <td>
                                            <p>
                                                <?php echo $rata2_min['KODE_PELATIHAN'].'-'.$rata2_min['ANGKATAN']?>
                                            </p>
                                            <p>
                                                Rp <?php echo number_format($rata2_min['rata_per_orang'], 0, ',', '.') ?>
                                            </p>
                                        </td>
                                    </tr>
                                </table>
                                <!----->
                            </td>
                        </tr>
                    </table>
                </td><!--box3-->
            </tr>
            <tr>
                <td><!--box4-->
                    <p>Detail Perkelas</p>
                    <!----->
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="box4">
                        <tr>
                            <td>Kelas</td>
                            <td>Peserta Total</td>
                            <td>Peserta ITB</td>
                            <td>Pemasukan</td>
                            <td>Piutang</td>
                            <td> Rata-rata Perorang</td>
                            <td>Status </td>
                        </tr>
                        <?php foreach($list_kelas as $kelas){?>
                        <tr>
                            <td><?php echo $kelas['KODE_PELATIHAN'].'-'.$kelas['ANGKATAN']?></td>
                            <td><?php echo $kelas['jumlah_peserta'] ?> Orang</td>
                            <td><?php echo $kelas['jumlah_peserta_ITB'] ?> Orang</td>
                            <td>Rp <?php echo number_format($kelas['total_pemasukan'], 0, ',', '.') ?></td>
                            <td>Rp <?php echo number_format($kelas['piutang'], 0, ',', '.') ?></td>
                            <td>Rp <?php echo number_format($kelas['rata_per_orang'], 0, ',', '.') ?></td>
                            <td><?php echo $kelas['STATUS'] ?></td>
                        </tr>
                        <?php } ?>
                    </table>
                    <!----->
                </td><!--box4-->
            </tr>
        </table>
        <!---->
    </body>
</html>
